package com.yanqu.road.logic.bussiness.player;

import com.yanqu.road.entity.config.manor.*;
import com.yanqu.road.entity.manor.*;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 * @author ：zfr
 * @date ：2021/5/19 11:16
 */
public class UserManorBusiness {
    public static Map<Integer, ManorHarvestData> getHarvestDataMap(long userId) {
        return DaoHelper.getUserManorHarvestDataDaoImpl().getHarvestDataMap(userId);
    }

    public static UserManorData getUserManorData(long userId) {
        return DaoHelper.getUserManorDataDaoImpl().getUserManorData(userId);
    }

    public static Map<Integer, ManorGuestData> getGuestDataMap(long userId) {
        return DaoHelper.getUserManorGuestDataDaoImpl().getGuestDataMap(userId);
    }

    public static Map<Integer, ManorTechnologyData> getTechnologyDataMap(long userId) {
        return DaoHelper.getUserManorTechnologyDataDaoImpl().getTechnologyDataMap(userId);
    }

    public static boolean add(UserManorData userManorData) {
        return DaoHelper.getUserManorDataDaoImpl().add(userManorData);
    }

    public static boolean update(UserManorData userManorData) {
        return DaoHelper.getUserManorDataDaoImpl().update(userManorData);
    }

    public static boolean add(ManorHarvestData harvestData) {
        return DaoHelper.getUserManorHarvestDataDaoImpl().add(harvestData);
    }

    public static boolean update(ManorHarvestData harvestData) {
        return DaoHelper.getUserManorHarvestDataDaoImpl().update(harvestData);
    }

    public static boolean add(ManorGuestData additionData) {
        return DaoHelper.getUserManorGuestDataDaoImpl().add(additionData);
    }

    public static boolean update(ManorGuestData additionData) {
        return DaoHelper.getUserManorGuestDataDaoImpl().update(additionData);
    }

    public static boolean add(ManorTechnologyData technologyData) {
        return DaoHelper.getUserManorTechnologyDataDaoImpl().add(technologyData);
    }

    public static boolean update(ManorTechnologyData technologyData) {
        return DaoHelper.getUserManorTechnologyDataDaoImpl().update(technologyData);
    }

    public static Map<Integer, ManorBuildingData> getBuildingDataMap(long userId) {
        return DaoHelper.getUserManorBuildingDataDaoImpl().getBuildingDataMap(userId);
    }

    public static boolean add(ManorBuildingData buildingData) {
        return DaoHelper.getUserManorBuildingDataDaoImpl().add(buildingData);
    }

    public static boolean update(ManorBuildingData buildingData) {
        return DaoHelper.getUserManorBuildingDataDaoImpl().update(buildingData);
    }

    public static Map<Integer, ManorConfig> getManorConfigMap() {
        return DaoHelper.getManorConfigDaoImpl().getManorConfigMap();
    }

    public static Map<Integer, ManorGuestConfig> getManorGuestConfigMap() {
        return DaoHelper.getManorConfigDaoImpl().getManorGuestConfigMap();
    }

    public static Map<Integer, ManorTechnologyConfig> getManorTechnologyConfigMap() {
        return DaoHelper.getManorConfigDaoImpl().getManorTechnologyConfigMap();
    }

    public static Map<Integer, ManorUpgradeConfig> getManorUpgradeConfigMap() {
        return DaoHelper.getManorConfigDaoImpl().getManorUpgradeConfigMap();
    }

    public static LinkedList<ManorHelpRecord> getManorHelpRecordList(long userId, int maxCount) {
        return DaoHelper.getManorHelpRecordDaoImpl().getManorHelpRecordList(userId, maxCount);
    }

    public static boolean addManorHelpRecord(ManorHelpRecord manorHelpRecord) {
        return DaoHelper.getManorHelpRecordDaoImpl().add(manorHelpRecord);
    }

    public static boolean updateManorHelpRecord(ManorHelpRecord manorHelpRecord) {
        return DaoHelper.getManorHelpRecordDaoImpl().update(manorHelpRecord);
    }

    public static boolean insertManorWeather(List<ManorWeather> list) {
        return DaoHelper.getUserManorDataDaoImpl().insertManorWeather(list);
    }

    public static List<ManorWeather> getManorWeather() {
        return DaoHelper.getUserManorDataDaoImpl().getManorWeather();
    }
}
